from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By


options = webdriver.ChromeOptions()  # 下载选择器
prefs = {
    "download.default_directory": "D:",    # 设置下载到D盘
    "profile.default_content_settings.popups": 0    # 设置0禁止弹出窗口
}

options.add_experimental_option("prefs", prefs)   # 载入方法
driver = webdriver.Firefox(options=options)     # 调用方法
driver.get("https://npm.taobao.org/mirrors/chromedriver/80.0.3987.106/")    # 进入下载链接
sleep(3)
driver.find_element(By.XPATH, "/html/body/table/tbody/tr[6]/td[2]/a").click()   # 点击下载